﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Collections;

public partial class Left : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            BindTreeView(tvTitle);
        }
    }

    private void BindTreeView(TreeView treeView)
    {
        string strImgUrl = "Image/icon/base.gif";
        //CreateFatherNode(treeView,strImgUrl);
        
    }
    private void CreateFatherNode(TreeView treeView,string strImgUrl)
    {
        treeView.Nodes.Clear();
        TreeNode rootNode = new TreeNode();
        rootNode.Text = "个人办公";
        rootNode.Expanded = true;
        rootNode.ImageUrl = strImgUrl;
        rootNode.Selected = true;
        treeView.Nodes.Add(rootNode);
        CreateChildNode(rootNode);
    }
    private void CreateChildNode(TreeNode rootNode)
    { 
        //sqlSelect nodeSelect = new sqlSelect();
        //ArrayList alNode = nodeSelect.Purview("Andrew");
        
        //for (int i=0;i<alNode.Count;i++)
        //{
        //    TreeNode childNode = new TreeNode();
        //    childNode.Text = alNode[i].ToString();
        //    childNode.Value = alNode[i].ToString();
        //    childNode.Expanded = true;
        //    rootNode.ChildNodes.Add(childNode);
        //}
        
    }
    
    
}